import React, { useEffect, useState } from 'react';
import { Space, Table, Tag,Input } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import {initTable} from '@/hoc/index.js'
import {getchatlog} from '@/api/service'


interface DataType {
  key: string;
  name: string;
  age: number;
  address: string;
  tags: string[];
}

const columns: ColumnsType<DataType> = [
  {
    title: 'ID',
    dataIndex: 'log_id',
    key: 'log_id',
  },
  {
    title: '发送人',
    dataIndex: 'from_name',
    key: 'from_name',
  },
  {
    title: '消息',
    dataIndex: 'message',
    key: 'message',
  },
  {
    title: '接收人',
    dataIndex: 'to_name',
    key: 'to_name',
  },
  {
    title: '创建时间',
    dataIndex: 'create_time',
    key: 'create_time',
  }
];


type Props = {};

const chatlog = (props: any) => {
  
  return (
    <div>
      
      <Table columns={columns} dataSource={props.data} />
    </div>
  );
};

export default initTable(getchatlog)(chatlog);
